<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Category extends BaseController {
    public $json_content;
    public function __construct()
    {

        parent::__construct();
        $this->load->model('category_model', 'cat');
        $this->json_content = $this->getFileContent();
    }
    /**
     *------------------------------------------------------------------------------------------------------------------
     * @title：分类查询页面
     * @action：/Category/index.json
     * @method：GET
     * @param：reginMobile             类型：STRING，必须：YES ，描述：手机号码
     * @author:：KevinBai
     *------------------------------------------------------------------------------------------------------------------
     */
    public function index()
    {
        $result = array();
        $catlist = $this->cat->get_cat_list(" id, name, name_en,imgurl");
        foreach ($catlist as $key => $value) {
            $catlist[$key]['imgurl'] = BASEURL.$value['imgurl'];
        }

        $this->createApi($catlist);
    }

}

/* End of file category.php */
/* Location: ./application/controllers/luckydog/category.php */
